<%@page import="main.LogicImageSegmentation"%>
<%@page import="main.OneDataTest"%>
<%@page import="java.io.File"%>
<%@page import="java.util.ArrayList"%>
<jsp:useBean id="lis" class="main.LogicImageSegmentation" scope="application"/>
<%
        
        // get the app path
        String appPath = config.getServletContext().getRealPath("/");
        //System.out.println("APP PATH : "+appPath);
        // data set path                 
        File ff = new File(appPath);
        //String dataSetPath = ff.getParentFile().getParentFile().toString() + "/";     // get /ImageSegmentation/ ..
        String dataSetPath = appPath;   // get /ImageSegmentation/ ..        
        try {                                               
            lis.appendData(lis.m_OneDataTest, dataSetPath + LogicImageSegmentation.FILE_DATA_SET_NAME_ARFF);
            lis.AllOutLearningJSP(dataSetPath + LogicImageSegmentation.FILE_DATA_TEST_NAME_ARFF,dataSetPath + LogicImageSegmentation.FILE_MODEL_NAME_WEKA_IBK, dataSetPath + LogicImageSegmentation.FILE_MODEL_NAME_WEKA_NAIVE_BAYES, dataSetPath + LogicImageSegmentation.FILE_MODEL_NAME_WEKA_ID3, dataSetPath + LogicImageSegmentation.FILE_MODEL_NAME_SI_IBK, dataSetPath + LogicImageSegmentation.FILE_MODEL_NAME_SI_NAIVE_BAYES, dataSetPath + LogicImageSegmentation.FILE_MODEL_NAME_SI_ID3);            
            System.out.println("instane" + lis.m_Instances.numInstances());
            String log = lis.AccuracyLearningComparation();                           
            out.println(log);
            
        } catch (Exception e) {
            out.println("false");
            e.printStackTrace();
        }
    



%>